<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :maskClosable="false"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
    @cancel="handleCancel"
  >
    <div>
      <a-input
        style="width: calc(100% - 380px)"
        v-model="content"
        placeholder="请输入说明"
        allowClear
        addon-before="说明："
      />
    </div>
    <template slot="footer">
      <a-button @click="handleRefuse" type="danger">拒绝</a-button>
      <a-button @click="handleCancel">取消</a-button>
      <a-button @click="handleOk" type="primary">审批</a-button>
    </template>
  </j-modal>
</template>
  
  <script>
export default {
  name: 'ConfirmModal',
  components: {},
  mixins: [],
  data() {
    return {
      title: '审核',
      content: '',
      width: 800,
      recordId:'',
      visible: false,
      disableSubmit: false,
      formDisabled: true,
      maxHeight: 550,
    }
  },
  created() {
    this.maxHeight = document.body.clientHeight - 230
  },
  methods: {
    updateItem() {
      ;(this.handleRefuseFlag = false), console.log(this.model.id)
      if (this.model.id) {
        let params = { id: this.model.id }
        this.requestSubTableData(this.url.pomPurchaseOrderItem.list, params, this.pomPurchaseOrderItemTable)
      }
    },
    show() {
      this.content = ''
      this.visible = true
    },
    close() {
      this.visible = false
    },
    handleOk() {
      this.$emit('myHandleConfirm', this.content, this.recordId)
      this.close()
    },
    handleRefuse() {
      if (!this.content) {
        this.$message.error('请填写备注内容！')
        return
      }
      this.$emit('myHandleUnConfirm', this.content, this.recordId)
      this.close()
    },
    handleCancel() {
      this.close()
    },
  },
}
</script>
  
  <style scoped>
.vxe-grid {
  padding: 20px 0;
}
.amount {
  width: 180px;
  margin-right: 9px;
  display: inline-block;
  height: 32px;
  line-height: 32px;
  font-weight: 600;
  font-size: 16px;
  font-family: fantasy;
}
</style>
  